﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="AuthoritySign.aspx.cs"
    Inherits="Manager_AuthoritySign_AuthoritySign" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
        <tr>
            <td style="height: 14px">
                <table border="1" bordercolor="#407db3" cellpadding="2" cellspacing="2" class="tbl_Comon-Search"
                    style="margin-left: 0px; width: 100%; border-collapse: collapse" width="100%">
                    <tr>
                        <td align="center" nowrap="nowrap" rowspan="2" style="width: 87px" valign="middle">
                            <asp:Button ID="btnSearch" runat="server" CssClass="cssButton" OnClick="btnSearch_Click"
                                Text="Tìm kiếm" Width="80px" /></td>
                        <td class="td_Title" nowrap="nowrap" rowspan="1" style="width: 109px">
                            <asp:Label ID="Label1" runat="server" CssClass="lbl_Common-Search" Text="Họ tên"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap" rowspan="1">
                            <asp:TextBox ID="txtName" runat="server" Height="20px" Width="98%" CssClass="txt_Product"></asp:TextBox></td>
                        <td class="td_Title" nowrap="nowrap" style="width: 80px">
                            <asp:Label ID="Label2" runat="server" CssClass="lbl_Common-Search" Text="Quyền hạn"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap" style="width: 102px">
                            <asp:DropDownList ID="ddlChuDe" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlChuDe_SelectedIndexChanged"
                                CssClass="cssDropdownlist">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td class="td_Title" nowrap="nowrap" rowspan="1" style="width: 109px">
                            <asp:Label ID="Label3" runat="server" CssClass="lbl_Common-Search" Text="Tên đăng nhập"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap" rowspan="1">
                            <asp:TextBox ID="txtLogin" runat="server" Height="20px" Width="98%" CssClass="txt_Product"></asp:TextBox></td>
                        <td class="td_Title" nowrap="nowrap" style="width: 80px">
                            <asp:Label ID="Label4" runat="server" CssClass="lbl_Common-Search" Text="Email"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap">
                            <asp:TextBox ID="txtEmail" runat="server" Height="20px" Width="97%" CssClass="txt_Product"></asp:TextBox></td>
                    </tr>
                </table>
                <br />
                <asp:GridView ID="grv_MasterUser" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    BorderColor="#407DB3" BorderWidth="1px" CellPadding="2" DataKeyNames="UserID"
                    PageSize="20" Width="100%" OnRowDataBound="grv_MasterUser_RowDataBound" OnPageIndexChanging="grv_MasterUser_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Họ tên
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("CusNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="40%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Tên đăng nhập
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label55" runat="server" Text='<%# Eval("UserNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="25%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Email
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="15%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Quyền hạn
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblsex" runat="server" Text='<%# Eval("AutNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="15%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <img src='../../Images/Icon/menuicon.png' border="0" alt='Quản lý menu' width='20px'
                                    height='20px' style="cursor: pointer" onclick='fnViewMenuDetal(this,<%# Eval("UserID") %>)'
                                    UserNm='<%# Eval("UserNm") %>'>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="gvRowStyle" />
                    <AlternatingRowStyle CssClass="gvAlternatingRowStyle" />
                    <HeaderStyle CssClass="gvHeader" />
                </asp:GridView>
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
    function fnViewMenuDetal(obj,UserID)
    {     
            var CodeID='<%= Request.QueryString["CodeID"]%>';
            var UserNm=obj.getAttribute("UserNm");
            window.location.href="AddAuthoritySign.aspx?CodeID="+CodeID+"&UserID="+UserID+"&UserNm="+UserNm;
        
    }
    </script>

</asp:Content>
